package com.han.sp04.fegin;

import cn.han.pojo.User;
import cn.han.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "user-service")
public interface UserClient {
    @GetMapping("/{userId}")
    JsonResult<User> getUser(@PathVariable("userId") Integer userId);
    @PostMapping("/{userId}/score")
    JsonResult<?> addScore(@PathVariable("userId") Integer userId,
                           @RequestParam("score") Integer score);
}
